package main

// "myddns/routes"
import (
	"fmt"
	"myddns/config"
	"myddns/router"
	"strconv"
)

const (
	configFilePath = "app-setting.json"
)

func main() {
	config.SetConfigFilePath(configFilePath)

	portStr := strconv.Itoa(config.LoadConfig().Server.Port)
	svcStr := config.LoadConfig().Server.BindIp + ":" + portStr

	r := router.SetupRouter()

	if err := r.Run(svcStr); err != nil {
		fmt.Printf("startup service failed, err:%v\n", err)
	}

}
